package me.spring.cloud.common.components.util.http;

import cn.hutool.http.HttpResponse;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author luffy
 * @description: 自定义http请求反馈封装
 * @date 2019-08-23 11:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class HttpReqResponse implements Serializable {

  private static final long serialVersionUID = -6091030007282738818L;

  private HttpRspStatus status;

  private String msg;

  private HttpResponse response;

  public HttpReqResponse(HttpResponse response) {
    this.response = response;
    this.status = HttpRspStatus.SUCCESS;
  }

  public HttpReqResponse(HttpRspStatus status, String msg) {
    this.status = status;
    this.msg = msg;
  }
}
